package org.hermes.core;

import java.security.MessageDigest;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.reflect.TypeToken;
import com.sun.org.apache.bcel.internal.generic.Type;

public class Teste {
	public static void main(String[]s) throws Exception{
		/*GsonBuilder bui = new GsonBuilder();
		
		bui.setDateFormat("dd/MM/yyyy");
		
		Gson gson = bui.create();
		
		
		
		Map m = new HashMap();
		
		m.put("teste1", "1");
		m.put("teste2", "2");
		m.put("teste3", "3");
		
		String str = gson.toJson(m, m.getClass());
		
		Leandro leo = new Leandro();
		leo.nome = new Date(System.currentTimeMillis());
		
		System.out.println(gson.toJson(leo));
		
			
		String js = "{\"nome\":\"Juka\"}";
		
		Leandro l = gson.fromJson(js, Leandro.class);
		
		System.out.println(l.nome);*/
		
		MessageDigest md5 = MessageDigest.getInstance("MD5");
		md5.update("Leandro1".getBytes());
	    byte[] toChapter1Digest = md5.digest();
	    System.out.println(new String(toChapter1Digest));
	}
	
	public static class Leandro {
		Date nome;
	}
}
